import React, {Component} from 'react';
import { Redirect, Switch, Route } from "react-router-dom";

import WebHeader from './components/WebHeader';
import WebTailer from './components/WebTailer';
import WebIndex from './pages/WebIndex';
import WebProductService from './pages/WebProductService';
import WebProductRace from './pages/WebProductRace';
import WebWorkShop from './pages/WebWorkShop';
import WebTechService from './pages/WebTechService';
import WebTrainingCamp from './pages/WebTrainingCamp'


class App extends Component {
    render() {
        return (
            <div>
                <WebHeader></WebHeader>
                <Switch>
                    {/* 首页 */}
                    <Route path="/index" component={WebIndex} />
                    {/* 产品服务 */}
                    <Route path="/service" component={WebProductService} />
                    {/* 创新大赛 */}
                    <Route path="/race" component={WebProductRace} />
                    {/* 数字工作坊 */}
                    <Route path="/wordshop" component={WebWorkShop} />
                    {/* 技术服务 */}
                    <Route path="/tech" component={WebTechService} />
                    {/* 实战训练营 */}
                    <Route path="/training" component={WebTrainingCamp} />
                    

                    <Redirect to="/index"></Redirect>
                </Switch>
                <WebTailer></WebTailer>
            </div>
        ) 
    }
}

export default App